let wid = 0
class watcher {
    constructor(vm, exprOrFn, cb, options) {
        this.vm = vm
        if(typeof exprOrFn == 'function') {
            this.getter = exprOrFn
        }
        this.cb = cb
        this.options = options
        this.id = wid++
        this.value = this.get()
    }

    get() {
        const vm = this.vm
        let value = this.getter.call(vm, vm)
        return value
    }
}